package com.gzk.service;

import com.gzk.domain.ProductStore;
import com.baomidou.mybatisplus.service.IService;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jake.Chen
 * @since 2022-02-07
 */
public interface IProductStoreService extends IService<ProductStore> {

    /**
     * 根据商品id查库存
     * @param id
     * @return
     */
    Long getStoreByProductId(Long id);

    /**
     * 减库存
     * @param map
     */
    void reduceStore(Map<String, Long> map);
}
